import {
	GET,
	POST,
	POSTJSON,
	PUT,
	DELETE,
	POSTFORM
} from './index'

// 获取 banner列表
const BannerBannerList = params => {
	const url = '/Web/Banner/BannerList.ashx';
	return new Promise(resolve => {
		POSTJSON(url, params).then(res => {
			if (res) {
				if (res.success === true) {
					resolve(res.data)
				}
			}
		})
	})
}

// 获取首页的问题
const QuestionQuestion_List = params => {
	const url = 'Web/Question/Question_List.ashx';
	return new Promise(resolve => {
		POSTJSON(url, params).then(res => {
			if (res) {
				if (res.success === true) {
					resolve(res.data)
				}
			}
		})
	})
}



// 获取首页的问题
const SubjectSubjectList = params => {
	const url = 'Web/Subject/SubjectList.ashx';
	return new Promise(resolve => {
		POSTJSON(url, params).then(res => {
			if (res) {
				if (res.success === true) {
					resolve(res.data)
				}
			}
		})
	})
}

const SubjectSubSubjectList = params => {
	const url = 'Web/Subject/SubSubjectList.ashx';
	return new Promise(resolve => {
		POSTJSON(url, params).then(res => {
			if (res) {
				if (res.success === true) {
					resolve(res.data)
				}
			}
		})
	})
}







module.exports = {
	BannerBannerList,				//  获取首页
	QuestionQuestion_List,
	SubjectSubjectList ,
	SubjectSubSubjectList 
}